﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class Control_InsertBusTYpeControl : System.Web.UI.UserControl
{
    ListAndProcessData ws = new ListAndProcessData();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        bool a = false;
        a = ws.InsertBusType(txtName.Text, txtTotalSeats.Text, txtPrice.Text, txtDescription.Text);
        if (a == true)
        {
            Response.Redirect("../Admin/showBusType_Admin.aspx");

        }
        else
        {
            Response.Redirect("Default3.aspx");
        }
    }
    protected void btnreset_Click(object sender, EventArgs e)
    {
        txtDescription.Text = "";
        txtName.Text = "";
        txtPrice.Text = "";
        txtTotalSeats.Text = "";
    }
}